FROM 1209233066/debian:11-alisource
MAINTAINER wangendao(1209233066@qq.com)
 
ENV JAVA_HOME /opt/jdk
ENV PATH ${PATH}:${JAVA_HOME}/bin
ARG TZ=Asia/Shanghai
 
 
#Server JRE (Java SE Runtime Environment) openjdk 17
ADD https://download.oracle.com/java/17/latest/jdk-17_linux-x64_bin.tar.gz /opt
 
RUN sed -i 's/deb.debian.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apt/sources.list \
&& ln -sf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone \
&& tar xf /opt/* -C /opt \
&& rm -f /opt/*.tar.gz \
&& ln -sf /opt/* /opt/jdk

CMD ["java","-version"] 

